//luogu.P1540
#include<bits/stdc++.h>
#define N 1003
bool Hash[N] = {0};

struct myquene
{
    int data[N];
    int head, rear;
    bool init()
    {
        head = rear = 0;
        return true;
    }
    int size(){return (rear - head) % N;}
    bool empty()
    {
        if(size() == 0) return true;
        else            return false;
    }
    bool push(int e)
    {
        if((rear + 1) % N == head) return false;
        data[rear] = e;
        rear = (rear + 1) % N;
        return true;
    }
    bool pop(int *e)
    {
        if(rear == head)return false;
        *e = data[head];
        data[head] = 0;
        head = (head + 1) % N;
        return true;
    }
    int front(){return data[head];}
};
int main()
{return 0;}